Control of an electric machine

ABSTRACT

A method of controlling an electric machine, the method comprising storing a plurality of power maps, each power map comprising control values for driving the electric machine at different power, and selecting a power map in response to an input signal. Additionally, a control system for an electric machine, and a product incorporating the control system and electric machine.

REFERENCE TO RELATED APPLICATIONS

This application claims the priority of United Kingdom Application No.0905910.6, filed Apr. 4, 2009, the entire contents of which areincorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to control of an electric machine.

BACKGROUND OF THE INVENTION

The control system of an electric machine may control the excitation ofphase windings in response to a speed demand signal or a torque demandsignal. However, it may be advantageous to adjust the power of theelectric machine in response to an input signal.

SUMMARY OF THE INVENTION

In a first aspect, the present invention provides a method ofcontrolling an electric machine, the method comprising: storing aplurality of power maps, each power map comprising control values fordriving the electric machine at different power; and selecting a powermap in response to an input signal.

The input signal may therefore be used to control the power of theelectric machine. The input signal may include, for example, apower-supply identification signal. Accordingly, a different power mapmay be selected for different types of power supply, and in particularpower supplies of different voltages. The input signal may also includea power-mode signal, which may be generated by a user interface. A useris then able to control the power of the electric machine via the userinterface. For example, a first power map may be selected when thepower-mode signal is logically low and a second power map may beselected when the power-mode signal is logically high. The first andsecond power maps then achieve different power for the electric machine.Furthermore, the input signal may include an accessory signal that isgenerated whenever an accessory draws power from the power supply. Sincethe accessory draws power from the power supply, excessive currentdemand on the power supply may be prevented by selecting a particularpower map in response to the accessory signal. In particular, a powermap that delivers a lower power for the electric machine may be selectedin response to the accessory signal.

Each power map preferably comprises a first control value and a secondcontrol value. The method then comprises sequentially excites andfreewheels a winding of the electric machine. The winding is excited inadvance of zero-crossings of back emf in the winding by an advance timethat is defined by the first control value, and the winding isfreewheeled for a freewheel time that is defined by the second controlvalue. The control values thus act to control the excitation of thewinding so as to control the power of the electric machine. For example,by selecting a first control value that increases the advance time,current is driven into the winding at an earlier stage, and thus thepower may be increased. Similarly, by selecting a second control valuethat decreases the freewheel time, current is driven into the windingover a longer period and thus the power may again be increased.Accordingly, by selecting a particular power map, the efficiency andpower of the electric machine can be controlled.

In the region of falling back emf, less torque is achieved for a givenlevel of current. Accordingly, by freewheeling the winding within thisregion, a more efficient electric machine may be realised. Additionally,as the back emf in the winding falls, current spikes may arise shouldthe excitation voltage exceed the falling back emf. By freewheeling thewinding within the region of falling back emf, current spikes may beavoided and thus a smoother current waveform may be achieved.

Each power map preferably comprises a lookup table storing a firstcontrol value and a second control value for each of a plurality ofvoltage levels. The method then comprises selecting from the power map afirst control value and a second control value according to anexcitation voltage used to excite the winding. By selecting differentcontrol values in response to the level of the excitation voltage,better control over both the efficiency and the power of the electricmachine may be achieved.

The method ideally comprises periodically monitoring the excitationvoltage and selecting from the power map a first control value and asecond control value according to the monitored voltage. Accordingly,the electric machine is controlled in response to changes in theexcitation voltage such that a particular performance may be maintained.

Preferably, each power map stores control values that increase theadvance time and decrease the freewheel time with decreasing excitationvoltage. Consequently, as the excitation voltage decreases, current isdriven into the winding at an earlier stage. Additionally, current isdriven into the winding over a longer period. Accordingly, in spite of adrop in excitation voltage, the same or similar power may be achieved.Indeed, each power map preferably stores control values that achievesubstantially constant power for the electric machine over a range ofexcitation voltages. Substantially constant power in this instanceshould be understood to mean that the variance in power is no more than+/−5%.

Preferably, each power map stores control values that achieve anefficiency (i.e. the ratio of output power to input power) of at least75% for the electric machine over a range of excitation voltages.

The range of excitation voltages may extend between a minimum voltageand a maximum voltage, with the minimum voltage being less than 80% ofthe maximum voltage. This then represents a relatively broad range ofvoltages over which constant power and/or good efficiency may beachieved. Consequently, a battery pack may be used to as an excitationsource. In spite of battery discharge with use, constant power and/orgood efficiency may nevertheless be achieved.

Preferably, the method comprises applying a speed-correction value to atleast one of the first control value and the second control value, thespeed-correction value varying with the speed of the electric machine.As the speed of the electric machine varies, the back emf induced in thewinding, and thus the power of the electric machine, also varies. Bycorrecting one or both of the control values for speed, the effect ofspeed on the power may be reduced.

Advantageously, the speed-correction value varies with both the speed ofthe electric machine and a level of excitation voltage. As alreadynoted, by correcting one or both of the control values for speed, theeffect of speed on the power can be reduced. However, the idealcorrection depends on the level of the excitation voltage. Inparticular, a larger correction is ideally required for a lowerexcitation voltage. By applying a speed-correction value that varieswith both speed of the electric machine and the level of excitationvoltage, better control over power may be achieved.

The method preferably comprises storing a speed-correction lookup tablefor each power map. Each speed-correction lookup table then ideallystores a first speed-correction value and a second speed-correctionvalue for each of a plurality of speeds and a plurality of voltagelevels. The method then comprises selecting from the speed-correctionlookup table a first speed-correction value and a secondspeed-correction value according to the speed of the electric machineand the level of the excitation voltage, applying the firstspeed-correction value to the first control value and applying thesecond speed-correction value to the second control value. The use of alookup table to correct the control values for both speed and excitationvoltage then simplifies the control of the electric machine.

Advantageously, the speed-correction lookup table storesspeed-correction values that increase the advance time and/or decreasethe freewheel time with increasing speed. Accordingly, as the speed ofthe electric machine increases, and thus the back emf in the windingincreases, current is driven into the winding at an earlier stage.Additionally, current is driven into the winding over a longer period.Accordingly, the same or similar power may be achieved irrespective ofchanges in speed of the electric machine.

The method may comprise exciting the winding, monitoring a signalindicative of back emf in the winding, continuing to excite the windingfor a drive-off time in response to detecting an edge of the signal, andfreewheeling the winding for a freewheel time. The drive-off time isthen proportional to the first control value and the freewheel time isproportional to the second control value. This then presents aconvenient method of exciting the winding in advance of zero-crossingsof back emf.

Advantageously, each electrical half cycle comprises a single driveperiod and a single freewheel period. The winding is then excited duringthe drive period and freewheeled during the freewheel period. Followingthe freewheel period, the winding is commutated.

In a second aspect, the present invention provides a control system foran electric machine, the control system performing the method asdescribed in any one of the preceding paragraphs.

The control system ideally comprises a position sensor, such as aHall-effect sensor, that outputs a signal indicative of back emf in thewinding. The control system then uses the signal output by the positionsensor to control excitation and freewheeling of the winding.

The control system may comprise a current controller for limitingcurrent in the winding during excitation. This then prevents excessivecurrents building up in the winding, which might otherwise damagecomponents of the control system or demagnetise magnets of the electricmachine.

The control system may also comprise an inverter, a gate driver moduleand a drive controller. The drive controller then generates one or morecontrol signals to control excitation of the winding, and the gatedriver module in response to the control signals controls switches ofthe inverter.

In a third aspect, the present invention provides a product comprising apower supply, an electric machine, and a control system as described inany one of the preceding paragraphs. The control system then excites thewinding using the power supply.

The power supply may output a power-supply identification signal that isunique to the type of power supply. The power-supply identificationsignal is then delivered to the control system, which in responseselects a power map. The power-supply identification signal may have afrequency that is unique to the type of power supply. The power supplymay be a removable battery pack. Accordingly, the product may be usedwith different types of battery pack having different voltages.

The product may include an accessory that is powered by the powersupply. The accessory then generates an accessory signal when poweredon, and the accessory signal is delivered to the control system, whichin response selects an appropriate power map.

The product may also include a user interface having a power-modeselection switch for switching between a high-power and a low-powermode. The power-mode selection switch generates a power-mode selectionsignal that is delivered to the control system.

The product may be a vacuum cleaner, which may include an accessory inthe form of a motorised brushbar. The control system may then select adifferent power map to achieve a different power for the motor dependingon whether or not the brushbar is turned on.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the present invention may be more readily understood, anembodiment of the invention will now be described, by way of example,with reference to the accompanying drawings, in which:

FIG. 1 is a block diagram of a product in accordance with the presentinvention;

FIG. 2 is a block diagram of the motor system of the product of FIG. 1;

FIG. 3 is a schematic diagram of the motor system;

FIG. 4 is a schematic diagram of a current controller of the motorsystem;

FIG. 5 illustrates waveforms of the motor system during a period ofcurrent control;

FIG. 6 illustrates waveforms of the motor system when operating at highspeed;

FIG. 7 is a graph of advance angle and freewheel angle versus excitationvoltage; and

FIG. 8 is a product of the present invention in the form of a vacuumcleaner.

DETAILED DESCRIPTION OF THE INVENTION

The product 1 of FIG. 1 comprises a power supply 2, a user interface 3,an accessory 4, and a motor system 5.

The power supply 2 comprises a battery pack that supplies a DC voltageto both the accessory 4 and the motor system 5. The power supply 2 isremovable from the product 1 such that the product 1 may be used withdifferent battery packs. For the purposes of the present description,the power supply 2 is either a 4-cell battery pack providing a 16.4 V DCsupply or 6-cell battery pack providing a 24.6 V DC supply. In additionto providing a supply voltage, the power supply outputs anidentification signal that is unique to the type of battery pack. The IDsignal takes the form of a square-wave signal having a frequency thatvaries according to the type of battery pack. In the present example,the 4-cell battery pack outputs an ID signal having a frequency of 25 Hz(20 ms pulse length), while the 6-cell battery pack outputs an ID signalhaving a frequency of 50 Hz (10 ms pulse length). The ID signalcontinues to be output by the power supply 2 until such time as a faultis detected within the power supply 2, e.g. under-voltage orover-temperature of the cells. As is described below, the ID signal isused by the motor system 5 to identify the type of power supply 2 and toperiodically check that the power supply 2 is functioning correctly.

The user interface 3 comprises a power switch 6 and a power-modeselection switch 7. The power switch 6 is used to power on and off theproduct 1. In response to closing the power switch 6, a closed circuitis formed between the power supply 2 and each of the accessory 4 and themotor system 5. The power-mode selection switch 7 is used to controlwhether the motor system 5 operates in a high-power mode or a low-powermode. When the power-mode selection switch 7 is closed, a logically highpower-mode signal is output to the motor system 5.

The accessory 4 is removably attached to the product 1. When attached tothe product 1 and the product 1 is powered on, the accessory 4 drawspower from the power supply 2 and outputs an accessory signal to themotor system 5. Rather than continually drawing power whenever theaccessory 4 is attached and the product 1 is powered on, the accessory 4may include a power switch (not shown), e.g. forming part of the userinterface 3. The accessory 4 then draws power and outputs the accessorysignal only when the accessory power switch is closed.

Referring now to FIGS. 2 and 3, the motor system 5 comprises an electricmotor 8 and a control system 9.

The motor 8 comprises a two-pole permanent-magnet rotor 17 that rotatesrelative to a stator 18 about which a single-phase winding 19 is wound.The stator 18 is c-shaped, which enables a high fill-factor to beachieved for the winding 19. Accordingly, copper losses may be reduced,thereby improving the efficiency of the motor 8.

The control system 9 comprises a filter module 10, an inverter 11, agate driver module 12, a position sensor 13, a current sensor 14, acurrent controller 15, and a drive controller 16.

The filter module 10 links the power supply 2 of the product 1 to theinverter 11, and comprises a pair of capacitors C1,C2 arranged inparallel. The filter module 10 acts to reduce ripple in the voltagelinked to the inverter 11.

The inverter 11 comprises a full-bridge of four power switches Q1-Q4that link the power supply 2 to the winding 19 of the motor 8. Eachpower switch Q1-Q4 is a MOSFET, which provides fast switching and goodefficiency over the voltage range of the power supply 2. Other types ofpower switch might nevertheless be used, such as IGBTs or BJTs,particularly if the voltage of the power supply 2 exceeds the voltagerating of the MOSFETs. Each of the switches Q1-Q4 includes a flybackdiode, which protects the switch against voltage spikes from the backemf of the motor 8 during switching.

When a first pair of switches Q1,Q4 is closed, the winding 19 is excitedin a first direction (excite from left-to-right), causing current to bedriven around the winding 19 in a first direction. When a second pair ofswitches Q2,Q3 is closed, the winding 19 is excited in an oppositedirection (excite from right-to-left), causing current to be drivenaround the winding 19 in an opposite direction. Accordingly, theswitches Q1-Q4 of the inverter 11 can be controlled so as to commutatecurrent in the winding 19.

In addition to exciting the winding 19, the inverter 11 may becontrolled so as to freewheel the winding 19. Freewheeling occurs whenthe winding 19 is disconnected from the excitation voltage provided bythe power supply 2. This may occur by opening all switches Q1-Q4 of theinverter 11. However, the efficiency of the motor system 5 is improvedif either the high-side switches Q1,Q3 or the low-side switches Q2,Q4are closed during freewheeling. By closing either the high-side switchesQ1,Q3 or the low-side switches Q2,Q4, current in the winding 19 is ableto re-circulate through the switches rather than the less efficientflyback diodes. For the purposes of the present description,freewheeling is achieved by closing both low-side switches Q2,Q4.However, it should be understood that freewheeling might equally beachieved by closing the high-side switches Q1,Q3 or by opening allswitches Q1-Q4.

The gate driver module 12 drives the opening and closing of the switchesQ1-Q4 of the inverter 11 in response to control signals S1-S4 receivedfrom the drive controller 16. The gate driver module 12 comprises fourgate drivers 20-23, each gate driver driving a respective switch Q1-Q4in response to a control signal S1-S4 from the drive controller 16. Thegate drivers 20,22 responsible for the high-side switches Q1,Q3 areadditionally driven in response to an overcurrent signal received fromthe current controller 15. In response to the overcurrent signal, thegate drivers 20,22 open the high-side switches Q1,Q3. The overcurrentsignal takes precedence over the control signals S1,S3 of the drivecontroller 16 such that the high-side switches Q1,Q3 are opened inresponse to the overcurrent signal irrespective of the state of thecontrol signals S1,S3. This level of control may be achieved through theprovision of a NOR gate at the high-side gate drivers 20,22.

Table 1 summarises the allowed states of the switches Q1-Q4 in responseto the control signals S1-S4 of the drive controller 16 and theovercurrent signal of the current controller 15. Owing to the NOR gateoperating on the inputs of the high-side gate drivers 20,22, thehigh-side switches Q1,Q3 are closed by control signals S1,S3 that arelogically low.

TABLE 1 Overcurrent Control Signals Power Switches Signal S1 S2 S3 S4 Q1Q2 Q3 Q4 Inverter Condition 1 X X X X 0 X 0 X High-Side Switches Off 0 00 1 1 1 0 0 1 Excite Left to Right 0 1 1 0 0 0 1 1 0 Excite Right toLeft 0 1 1 1 1 0 1 0 1 Freewheel 0 1 0 1 0 0 0 0 0 All Switches Off

The position sensor 13 is a Hall-effect sensor that outputs a signalindicative of the angular position of the permanent-magnet rotor 17. Thesignal is a digital square wave, with each edge representing the angularposition at which the polarity of the rotor changes. The signal outputby the position sensor 13 is delivered to the drive controller 16, whichin response generates control signals S1-S4 that control the inverter 11and thus control the power delivered to the motor 8.

When rotating, the permanent-magnet rotor 17 induces a back emf in thewinding 19 of the motor 8. The polarity of the back emf changes with thepolarity of the rotor 17. Consequently, the position-sensor signalprovides not only a measure of the electrical position of the rotor 17,but also a measure of the back emf in the winding 19. Ideally, theposition sensor 13 is aligned relative to the rotor 17 such that theedges of the position-sensor signal are synchronous, or have apredetermined phase difference, with the zero-crossings of the back emf.However, following assembly of the motor system 5, there are tolerancesassociated with the alignment of the position sensor 13 relative to themotor 8. This in turn leads to a phase difference between the edges ofthe position-sensor signal and the zero-crossings of the back emf. As isdescribed further on in the section entitled ‘Post-Assembly Fine Tune’,these tolerances are compensated through the use of a position-sensoroffset which the drive controller 16 stores and subsequently uses tocorrect the position-sensor signal.

The current sensor 14 comprises a single sense resistor R1 located onthe negative rail of the inverter 11. The voltage across the currentsensor 14 therefore provides a measure of the current in the winding 19when connected to the power supply 2. The voltage across the currentsensor 14 is output to the current controller 15.

Referring now to FIG. 4, the current controller 15 comprises an input,an output, a threshold generator 24, a comparator 25 and an SR latch 26.

The input of the current controller 15 is coupled to the output of thecurrent sensor 14, and the output of the current controller 15 iscoupled to the input of each of the high-side gate drivers 20,22.

The threshold generator 24 comprises a reference voltage input, a PWMmodule 27, a non-volatile memory device 28, and a filter 29. The PWMmodule 27 employs a fixed frequency and a variable duty cycle that isset according to a scaling factor stored in the memory device 28. ThePWM module 27 operates on the voltage at the reference input to providea pulsed voltage signal, which is then smoothed by the filter 29 toprovide a scaled threshold voltage.

The comparator 25 compares the voltage at the input of the currentcontroller 15 against the threshold voltage output by the thresholdgenerator 24. If the voltage at the input exceeds the threshold voltage,the comparator 25 outputs a signal that sets the SR latch 26. Inresponse, the SR latch 26 generates an overcurrent signal at the outputof the current controller 15.

As noted above in Table 1, when the overcurrent signal is output by thecurrent controller 15 (i.e. when the overcurrent signal is logicallyhigh), the high-side gate drivers 20,22 open the high-side switchesQ1,Q3. Consequently, the current controller 15 disconnects the winding19 from the excitation voltage provided by the power supply 2 when thecurrent in the winding 19 exceeds a threshold. As is described furtheron in the section entitled ‘Post-Assembly Fine Tune’, by employing avoltage threshold that is scaled according to a scaling factor, eachindividual motor system 5 may be fine-tuned such that the effect ofcomponent tolerances on the current threshold can be trimmed out.

The current controller 15 also outputs an overcurrent interrupt to thedrive controller 16. In the embodiment illustrated in FIG. 4, the outputof the comparator 25 is delivered to the drive controller 16 as theovercurrent interrupt. However, the overcurrent signal output by thelatch 26 might equally be delivered to the drive controller 16 as theovercurrent interrupt. In response to the overcurrent interrupt, thedrive controller 16 executes an overcurrent routine. The drivecontroller 16 generates a control signal S2 or S4 that causes theremaining low-side switch Q2 or Q4 to close such that the winding 19freewheels. Freewheeling continues for a predetermined time, e.g. 100μs, during which the current in the winding 19 decays. After thepredetermined time has elapsed, the driver controller 16 switches thecontrol signal S2 or S4 so as to open the recently closed low-sideswitch Q2 or Q4 and outputs an latch-reset signal to the currentcontroller 15. The latch-reset signal causes the latch 26 of the currentcontroller 15 to reset, thereby driving the overcurrent signal low. Theinverter 11 is thus returned to the condition that existed before theovercurrent event occurred.

FIG. 5 illustrates the waveforms of the winding current, theposition-sensor signal, the switches Q1-Q4, the control signals S1-S4,the overcurrent signal, and the latch-reset signal over a typical halfcycle. As can be seen, the state of the switches Q1-Q4 is the samebefore and after each overcurrent event.

The current in the winding 19 may be chopped by the current controller15 many times during an electrical half cycle. As the speed of the motor8 increases, the back emf induced in the winding 19 increases.Consequently, the number of overcurrent events decreases with motorspeed. Eventually, the speed of the motor 8, and thus the magnitude ofthe back emf, is such that the current in the winding 19 no longerreaches the threshold during each half cycle.

The current controller 15 ensures that the current within the winding 19does not exceed a threshold. Accordingly, excessive currents areprevented from building up in the winding 19, which might otherwisedamage the switches Q1-Q4 of the inverter 11 or demagnetise the rotor17.

The drive controller 16 comprises a processor 30, a non-volatile memorydevice 31, six signal inputs and five signal outputs.

The memory device 31 stores software instructions for execution by theprocessor 30. In response to executing the instructions, the processor30 controls the operation of the motor system 5. In particular, theprocessor 30 generates control signals S1-S4 that control the switchesQ1-Q4 of the inverter 11 and thus drive the motor 8. The particularoperation of the drive controller 16 is described in further detailbelow. The memory device 31 also stores a plurality of power maps, aplurality of speed-correction maps, and a plurality of position-sensoroffsets.

The six signal inputs are the power-supply ID signal, the accessorysignal, the power-mode signal, the position-sensor signal, theovercurrent interrupt, and a voltage-level signal.

The voltage-level signal is derived from the power supply line, scaledby a potential divider R2,R3 and filtered by a capacitor C3 to removeswitching noise. The voltage-level signal thus provides the drivecontroller 16 with a measure of the link voltage provided by the powersupply 2. Owing to the internal resistance of the power supply 2, thelink voltage is less than the open-circuit voltage. For the 6-cellbattery pack, the maximum open-circuit voltage is 24.6 V, whichcorresponds to a link voltage of 23.0 V. For the 4-cell battery pack,the maximum open-circuit voltage is 16.4 V, which corresponds to a linkvoltage of 14.8 V. In addition to this upper limit, the drive controller16 stops operating when the link voltage drops below an undervoltagethreshold. For the 6-cell battery pack, the undervoltage threshold ofthe link voltage is 16.8 V, which corresponds to an open-circuit voltageof 19.0 V. For the 4-cell battery pack, the undervoltage threshold ofthe link voltage is 11.2 V, which corresponds to an open-circuit voltageof 12.8 V. The drive controller 16 therefore operates over a linkvoltage range of 16.8-23.0 V for the 6-cell battery and 11.2-14.8 V forthe 4-cell battery.

The five signal outputs are the four control signals S1-S4 and thelatch-reset signal. The four control signals S1-S4 are output to thegate driver module 12, which in response controls the opening andclosing of the switches Q1-Q4 of the inverter 11. More specifically,each control signal S1-S4 is output to a respective gate driver 20-23.The latch-reset signal is output to the current controller 15.

The drive controller 16 generates the control signals S1-S4 in responseto the signals received at the inputs. As is explained in further detailbelow, the timing of the control signals S1-S4 is controlled such thatthe motor 8 is driven at constant output power over a range of speeds.Moreover, constant output power is maintained irrespective of changes inthe link voltage of the power supply 2. Consequently, the motor 8 isdriven at constant output power as the power supply 2 discharges.

When the drive controller 16 generates a control signal, e.g. S1, toopen a particular switch Q1 of the inverter 11, there is a short delaybetween the generation of the control signal S1 and the physical openingof the switch Q1. If the drive controller 16 were to simultaneouslygenerate a control signal S2 to close the other switch Q2 on the samearm of the inverter 11, a short would potentially arise across the armof the inverter 11. This short, or ‘shoot-through’ as it is oftentermed, would damage the switches Q1,Q2 on that arm of the inverter 11.Accordingly, in order to prevent shoot-through, the drive controller 16employs a dead-time delay (e.g. 1 μs) between generating control signalsfor switches on the same arm of the inverter 11. It should therefore beunderstood that, when reference is made below to exciting orfreewheeling the winding 19, the drive controller 16 employs a dead-timedelay between control signals. The dead-time delay is ideally kept asshort as possible so as to optimise motor performance.

The current controller 15 and the drive controller 16 may form part of asingle component microcontroller. A suitable candidate is the PIC16F690microcontroller by Microchip Technology Inc. This microcontroller has aninternal comparator 25, latch 26, PWM module 27, non-volatile memorydevice 28,31 and processor 30. The output pin of the PWM module 27 isfed back into the input pin of the comparator 25 via the filter 29,which is external of the microcontroller. Additionally, the output ofthe comparator 25 serves as an internal overcurrent interrupt, which isdelivered to the processor 30 of the drive controller 16.

The current controller 15 and the drive controller 16 together provide aform of hysteretic current control. In particular, the currentcontroller 15 generates a latched overcurrent signal in response to anovercurrent event. The overcurrent signal causes the gate driver module12 to open the high-side switches Q1,Q3 of the inverter 11 to thusdisconnect the winding 19 from the link voltage used to excite thewinding 19. The drive controller 16 then resets the latch 26 after apredetermined period of time has elapsed, during which the current inthe winding 19 decays.

Current control is achieved through a combination of hardware andsoftware. In particular, the hardware of the current controller 15monitors the current in the winding 19 and generates an overcurrentsignal in the event that the current exceeds a threshold. The softwareof the drive controller 16 then resets the hardware of the currentcontroller 15 after a predetermined time.

By employing hardware to detect an overcurrent event, the control system9 responds relatively quickly to an overcurrent event. This is importantfor ensuring that the winding 19 is disconnected from the link voltageas soon as possible following an overcurrent event. If software wereinstead employed for monitoring an overcurrent event, there would be asignificant delay between the overcurrent event and the generation ofthe overcurrent signal, during which time the current in the winding 19may rise to a level that results in component damage or rotordemagnetisation.

By employing software to reset the hardware of the current controller15, the number of hardware components needed to control the current inthe winding 19 may be reduced. Additionally, the software of the drivecontroller 16 is able to control the predetermined period of time overwhich current in the winding 19 decays. In the present embodiment, thedrive controller 16 resets the latch 26 of the current controller 15after a fixed period of time has elapsed (100 μs). However, the drivecontroller 16 might equally reset the latch 26 after a period of timethat is adjusted according to the speed of the motor 8. Accordingly, thelevel to which the current decays with each chop may be bettercontrolled.

By chopping the current for a predetermined period of time, it is notnecessary to monitor the current in the winding 19 when disconnectedfrom the link voltage. Accordingly, current control may be achievedthrough the use of a single sense resistor. Not only does this reducethe component cost of the control system 9, but power dissipationthrough the single sense resistor is typically no more than 1% of theinput power.

The operation of the motor system 5, and in particular the drivecontroller 16, will now be described.

Initialisation Mode

When the power switch 6 is closed, power is delivered from the powersupply 2 to the motor system 5 causing the drive controller 16 to powerup. On powering up, the drive controller 16 polls the inputs of thepower supply ID signal, the accessory signal and the power-mode signal.On the basis of these three signals, the drive controller 16 selects apower map stored in memory 31. As is explained below, each power mapstores control values for driving the motor 8 at different output power.As can be seen from Table 2, the drive controller 16 stores fivedifferent power maps. If the power supply 22 is a 4-cell battery pack(i.e. if frequency of the power supply ID signal is 25 Hz), then thehigh-power mode is not available and the power-mode signal is ignored.

TABLE 2 Input Signals Power Supply Accessory Power-Mode Power Map 50 HzOff High 167 W 50 Hz On High 136 W 50 Hz On or Off Low  96 W 25 Hz OffIgnored 107 W 25 Hz On Ignored  83 W

The power map selected by the drive controller 16 is subsequently usedby the drive controller 16 to generate the control signals S1-S4 whenoperating in ‘High-Speed Acceleration Mode’ and ‘Running Mode’.

While the drive controller 16 is powered up, the drive controller 16periodically polls (e.g. every 8 ms) the power supply ID signal, theaccessory signal and the power-mode signal. If the power supply IDsignal is constantly high or low, rather than clocked, this suggest aproblem with the power supply 2; the drive controller 16 then opens allswitches Q1-Q4 and terminates. If the accessory signal or the power-modesignal changes, the drive controller 16 selects a new power map.

On selecting a power map, the drive controller 16 enters‘Resynchronisation Mode’.

Resynchronisation Mode

The drive controller 16 determines the speed of the motor 8 and selectsa mode of operation according to the determined speed. The speed of themotor 8 is obtained by measuring the time interval between two edges ofthe position-sensor signal, i.e. the pulse width. If the drivecontroller 16 fails to detect two edges within a predetermined time(e.g. 26 ms), the speed of the motor 8 is deemed to be no greater than 1krpm; the drive controller 16 then enters ‘Stationary Mode’. Otherwise,the drive controller 16 waits until a further edge of theposition-sensor signal is detected. The drive controller 16 thenaverages the time interval across the three edges to provide a moreaccurate determination of the motor speed. If the time interval betweentwo edges is greater than 1875 μs, the speed of the motor 8 isdetermined to be between 1 and 16 krpm; the drive controller 16 thenenters ‘Low-Speed Acceleration Mode’. If the time interval is between500 and 1875 μs, the speed of the motor 8 is determined to be between 16and 60 krpm, and the drive controller 16 enters ‘High-Speed AccelerationMode’. Otherwise, the speed of the motor 8 is deemed to be at least 60krpm and the drive controller 16 enters ‘Running Mode’. Table 3 detailsthe time intervals, speeds and modes of operation.

TABLE 3 Interval (μs) Speed (krpm) Mode t > 26000 ω ≦ 1 Stationary 1875< t ≦ 26000 1 < ω < 16 Low-Speed Acceleration 500 < t ≦ 1875 16 ≦ ω < 60High-Speed Acceleration t ≦ 500 ω ≧ 60 RunningStationary Mode (Speed≦1 krpm)

The drive controller 16 excites the winding 19 for a predetermined time,e.g. 26 ms. During this time, the drive controller 16 commutates thewinding 19 (i.e. reverses the direction of excitation) in synchrony withedges of the position-sensor signal. This initial period of excitationshould cause the rotor 17 to rotate. If during this predetermined time,two edges of the position-sensor signal are detected, the drivecontroller 16 enters ‘Low-Speed Acceleration Mode’. Otherwise, the drivecontroller 16 opens all switches Q1-Q4 and writes a ‘Failure to Start’error to the memory device 31.

Low-Speed Acceleration Mode (1 krpm<speed<16 krpm)

The drive controller 16 excites the winding 19 in synchrony with theedges of the position-sensor signal. Synchronous excitation continuesuntil the speed of the motor 8 reaches 16 krpm, as determined by thetime interval between successive edges, after which the drive controller16 enters ‘High-Speed Acceleration Mode’. If the motor 8 fails to reach16 krpm within a predetermined time, e.g. 2.5 s, the drive controller 16opens all switches Q1-Q4 and writes an ‘Underspeed’ error to the memorydevice 31.

High-Speed Acceleration Mode (16≦speed<60 krpm)

During high-speed acceleration, the drive controller 16 sequentiallyexcites and freewheels the winding 19. More particularly, eachelectrical half-cycle comprises a single drive period, during which thewinding 19 is excited, followed by a single freewheel period, duringwhich the winding 19 is freewheeled. During the drive period, thecurrent in the winding 19 may be chopped by the current controller 15.Consequently, the winding 19 may additionally be freewheeled for shortintervals (e.g. 100 μs) within the drive period. However, anyfreewheeling that occurs within the drive period is distinct from thatof the freewheel period. Following each freewheel period, the winding 19is commutated (i.e. the direction of excitation is reversed).

The drive controller 16 excites the winding 19 in advance of the edgesof the position-sensor signal, and thus in advance of the zero-crossingsof the back emf in the winding 19. Moreover, the drive controller 16excites the winding 19 in advance of the edges of the position-sensorsignal by a period of time that remains fixed as the motor 8 acceleratesfrom 16 krpm to 60 krpm. The drive controller 16 also freewheels thewinding 19 for a period of time that remains fixed as the motoraccelerates from 16 krpm to 60 krpm.

As described below in more detail, each power map (see Table 2)comprises a lookup table of advance times and freewheel times for aplurality of voltage levels. On entering ‘High-Speed Acceleration Mode’the drive controller 16 polls the voltage-level signal to obtain theexcitation voltage, i.e. the link voltage provided by the power supply2. The drive controller 16 then selects from the power map the advancetime, T_ADV, and the freewheel time, T_FREE, corresponding to theexcitation voltage. By way of example, if the selected power map is 167W (see Table 2) and the voltage-level signal indicates that theexcitation voltage is 22.7 V, the drive controller 16 selects from thepower map an advance time of 34 μs and a freewheel time of 128 μs (seeTable 4).

The winding 19 is excited and freewheeled in the following manner. Ondetecting an edge of the position-sensor signal, the drive controller 16continues to excite the winding 19 for the time period, T_DRIVE_OFF.T_DRIVE_OFF is calculated from the half-cycle time, T_HALF_CYCLE, theadvance time, T_ADV, and the freewheel time, T_FREE:T_DRIVE_OFF=T_HALF_CYCLE−T_ADV−T_FREE

The half-cycle time, T_HALF_CYCLE, is the time interval between twosuccessive edges of the position-sensor signal. The advance time, T_ADV,and the freewheel time, T_FREE, are the times obtained from the powermap.

Following the period T_DRIVE_OFF, the drive controller 16 freewheels thewinding 19 for the period T_FREE, after which the drive controller 16commutates the winding 19. The net result is that the drive controller16 excites the winding 19 in advance of the next edge of theposition-sensor signal by the advance time, T_ADV.

FIG. 6 illustrates the waveforms of the winding current, position-sensorsignal, excitation voltage, and control signals S1-S4 over a couple ofhalf cycles.

As the motor 8 accelerates, the back emf in the winding 19 increases. Ittherefore becomes increasingly difficult to drive current, and thuspower, into the winding 19 of the motor 8. If the winding 19 wereexcited in synchrony with the edges of the position-sensor signal, andthus in synchrony with the zero-crossings of the back emf, a speed wouldbe reached whereby it would be no longer possible to drive any morepower into the winding 19. By exciting the winding 19 in advance of theedges of the position-sensor signal, and thus in advance of thezero-crossings of the back emf, current is driven into the winding 19 atearlier stage. As a result, more power is driven into the winding 19.

Since the back emf in the winding 19 increases with motor speed, theelectrical angle at which excitation occurs in advance of the back emfideally increases with motor speed, i.e. the advance angle at 60 krpm isideally greater than that at 16 krpm. By exciting the winding 19 inadvance of back emf by a fixed period of time, T_ADV, the correspondingelectrical angle, A_ADV, increases with motor speed. In particular, theadvance angle, A_ADV, increases proportionally with the motor speed:A_ADV=T_ADV*ω/60*360°where ω is speed of the motor in rpm. Consequently, as the motor 8accelerates, current is driven into the winding 19 at an increasinglyearly stage. As a result, more power is driven into the winding 19.

By employing a fixed advance time, T_ADV, there is no need for the drivecontroller 16 to perform on-the-fly calculations of what advance angleshould be used as the motor 8 accelerates. This then greatly minimisesthe number of instructions needed to be executed by the processor 30 ofthe drive controller 16, and thus a cheaper processor 30 may be used.

The drive controller 16 freewheels the winding 19 at a time when theback emf in the winding 19 is falling. As the back emf in the winding 19falls, less torque is achieved for a given level of current.Accordingly, by freewheeling the winding 19 within this region, a moreefficient motor system 5 is achieved. Additionally, the back emf inwinding 19 may exceed that of the excitation voltage. Consequently, asthe back emf in the winding 19 falls, current spikes may arise shouldthe excitation voltage suddenly exceed that of the falling back emf. Byfreewheeling the winding 19 within the region of falling back emf,current spikes are avoided and thus a smoother current waveform isachieved.

The drive controller 16 continues to sequentially excite and freewheelthe winding 19 in the manner described above until the speed of themotor 8 reaches 60 krpm. During this time, the advance and freewheeltimes, T_ADV and T_FREE, are fixed. On reaching 60 krpm, the drivecontroller 16 enters ‘Running Mode’. If the motor fails to reach 60 krpmwithin a predetermined time, e.g. 2.5 s, the drive controller 16 opensall switches Q1-Q4 and writes an ‘Underspeed’ error to the memorydevice.

Running Mode (Speed 60 krpm)

As in ‘High-speed Acceleration Mode’, the drive controller 16sequentially excites and freewheels the winding 19. Each electricalhalf-cycle therefore continues to comprise a single drive periodfollowed by a single freewheel period. Again, the winding 19 is excitedin advance of the edges of the position-sensor signal, and thus inadvance of the zero-crossings of the back emf. However, in contrast to‘High-speed Acceleration Mode’, in which fixed times are employed forthe advance time and the freewheel time, the drive controller 16 nowvaries the advance time and the freewheel time so as to achieve constantoutput power.

The drive controller 16 excites the winding 19 in advance of the edgesof the position-sensor signal by an electrical angle, A_ADV, andfreewheels the winding 19 over the electrical angle, A_FREE. The drivecontroller 16 varies both the advance angle, A_ADV, and the freewheelangle, A_FREE, in response to changes in the excitation voltage (i.e.the link voltage of the power supply 2) and the speed of the motor 8 soas to achieve constant output power.

The power supply 2 is a battery pack and therefore the excitationvoltage decreases as the battery pack discharges with use. If theelectrical angles at which the winding 19 is excited and freewheeledwere fixed, the input power, and thus the output power, of the motorsystem 5 would decrease as the power supply 2 discharges. Accordingly,in order to maintain constant output power, the drive controller 16varies the advance angle, A_ADV, and the freewheel angle, A_FREE, inresponse to changes in the excitation voltage. In particular, theadvance angle, A_ADV, increases and the freewheel angle, A_FREE,decreases with decreasing excitation voltage. By increasing the advanceangle, A_ADV, current is driven into the winding 19 at an earlier stage.By decreasing the freewheel angle, A_FREE, the winding 19 is excited fora longer period over the half cycle. The net result is that, in responseto a drop in excitation voltage, more current is driven into the winding19 over the half cycle and thus constant output power is maintained.

FIG. 7 illustrates the variance in the advance angle and the freewheelangle for constant output power over the voltage range 16.8-23.0 V. Asnoted above, this voltage range corresponds to the DC link voltage ofthe 6-cell battery pack. Below 16.8 V, it is difficult to drivesufficient current into the winding 19 so as to maintain constant outputpower without potentially demagnetising the rotor 17. Additionally, thevoltage of the 6-cell battery pack drops off sharply below about 16.8 V.Accordingly, should the DC link voltage drop below 16.8 V, the drivecontroller 16 opens all switches Q1-Q4 and terminates. A similar patternis observed for the 4-cell battery pack over the operating range11.2-14.8 V; again, the drive controller 16 opens all switches Q1-Q4 andterminates when the DC link voltage drops below 11.2 V.

The variance in the advance angle and the freewheel angle is stored bythe drive controller 16 as a power map. Each power map comprises alookup table storing an advance time and a freewheel time for each of aplurality of voltage levels. As is described in more detail further on,the drive controller 16 monitors the voltage-level signal and selectsfrom the power map a corresponding advance time and freewheel time fromthe power map. The drive controller 16 then uses the advance andfreewheel times obtained from the power map to control excitation andfreewheeling of the winding 19. Consequently, constant output power isachieved for the motor system 5 irrespective of changes in theexcitation voltage. Table 4 illustrates a section of the 167 W powermap.

TABLE 4 DC Link Advance Freewheel Advance Freewheel Input Output Voltage(V) Time (μs) Time (μs) Angle (°) Angle (°) Power (W) Power (W) 16.8 91 51.2 54.1 30.4 189.4 166.5 16.9 90  52.8 53.5 31.4 189.9 167.0 17.0 89 56.0 52.3 33.3 189.7 166.9 17.1 88  57.6 51.1 34.2 189.5 166.8 . . . .. . . . . . . . . . . . . . . . . 22.7 34 128.0 20.2 76.0 187.5 166.822.8 33 128.0 19.6 76.0 188.3 167.5 22.9 32 129.6 19.0 77.0 187.6 166.923.0 31 129.6 18.4 77.0 187.3 166.6

The left-hand portion only of the table is stored by the drivecontroller 16 as the 167 W power map. The right-hand portion has beenincluded for the purposes of the present description and does not formpart of the power map. As can be seen from the table, the 167 W powermap stores advance times and freewheel times that deliver a constantoutput power of 167 W. The DC link voltage is sampled at a resolution of0.1 V. The power map is thus reasonably small without being so small asto adversely affect the performance of the motor system 5. Of course,depending upon the size of the memory device 31 of the drive controller16, the resolution of the power map may be increased or decreased.

It will be noted that the power map stores advance times and freewheeltimes rather than advance angles and freewheel angles. The drivecontroller 16 uses timers to generate the control signals S1-S4 thatexcite and freewheel the winding 19. Accordingly, by storing advance andfreewheel times rather than angles, the instructions performed by thedrive controller 16 are greatly simplified. Nevertheless, the power mapmight alternatively store advance angles and freewheel angles, which thedrive controller 16 then uses to control the excitation and freewheelingof the winding 19.

Each advance and freewheel angle has a corresponding time that dependson the speed of the motor 8. For each power map, the drive controller 16drives the motor 8 within a particular operating speed range. Eachoperating speed range has a nominal speed, which is used to calculatethe advance times and the freewheel times:T_ADV=(A_ADV/360°)*60/ω_(nominal)T_FREE=(A_FREE/360°)*60/ω_(nominal)where ω_(nominal) is the nominal speed in rpm. Table 5 lists theoperating speed ranges and the nominal speeds for the various powermaps.

TABLE 5 Min Speed Max Speed Nominal Speed Power Map (krpm) (krpm) (krpm)167 W 89.5 104.5 99 136 W 84.5 98.5 93.5  96 W 75 87.5 83 107 W 77.5 9186  83 W 71.5 83.5 79

Each power map stores advance times and freewheel times for the motor 8rotating at the nominal speed. So, for example, the 167 W power mapstores advance and freewheel times that achieve constant output powerwhen the motor 8 is rotating at a speed of 99 krpm. When the motor 8rotates at speeds above or below the nominal speed, the drive controller16 applies a speed-correction value to each of the advance time and thefreewheel time, as described below in more detail.

As noted above in the ‘Initialisation’ section, the drive controller 16stores five power maps and selects one of the power maps according tothe status of the power-supply ID signal, the accessory signal and thepower-mode signal. The output power of the motor 8 is thus determined bythe type of power supply 2 that is attached to the product 1, whether ornot the accessory 4 is attached and powered on, and whether a user hasselected a high-power mode or a low-power mode.

As can be seen from Table 2, a different power map is selected accordingto whether a 6-cell battery pack or a 4-cell battery pack is attached tothe product 1. Since the 4-cell battery pack has a lower chargecapacity, the product 1 would have a shorter run time if the same powermap were selected for both the 6-cell and the 4-cell battery packs. Byselecting a power map that delivers lower output power, a similar runtime for the 4-cell battery pack may be achieved at the expense ofoutput power.

When the 6-cell battery pack is attached to the product 1, the user isable to control the output power of the motor 8 via the power-selectionswitch 7. As can be seen in Table 2, a power map delivering an outputpower of 96 W is selected in response to a power-mode signal that islogically low, i.e. when the user selects low-power mode. A higher powermap delivering either 167 W (with the accessory off) or 136 W (with theaccessory on) is then selected in response to a power-mode signal thatis logically high, i.e. when the user selects a high-power mode.

Since the accessory 4 draws power from the power supply 2, the powersupply 2 will discharge more quickly if the same power map is selected.Additionally, excessive current might be drawn from the power supply 2in order to power both the accessory 4 and the motor 8. Accordingly, inresponse to the accessory signal, the drive controller 16 selects apower map that delivers lower output power, see Table 2. Consequently,the power supply 2 is protected from excessive current draw and asimilar run time for the product 1 may be achieved at the expense ofoutput power.

The power maps therefore provide a convenient means for controlling theoutput power of the motor system 5 in response to one or more inputsignals.

As noted above, each power map stores advance times and freewheel timesthat achieve constant output power when the motor 8 operates at anominal speed. However, as the speed of the motor 8 varies, the back emfin the winding 19 also varies. Consequently, if the angles at which thewinding 19 is excited and freewheeled were fixed, the output power ofthe motor 8 would vary with motor speed. In particular, the output powerof the motor 8 would decrease as the motor speed increases. In order tomaintain constant output power over each operating speed range, thedrive controller 16 varies the advance angle and the freewheel angle inresponse to changes in speed of the motor 8.

The drive controller 16 applies a speed-correction value to each of theadvance angle and the freewheel angle. As the motor speed increases, theback emf in the winding 19 increases. Consequently, in order to maintainconstant output power, a speed-correction value is applied to theadvance angle that increases the advance angle. Additionally, a speedcorrection value is applied to the freewheel angle that decreases thefreewheel angle. Current is therefore driven into the winding 19 at anearlier stage and over a longer period for each half cycle. As a result,constant output power may be achieved in spite of the increase in backemf.

The speed-correction values that are applied to the advance angle andthe freewheel angle depend not only on the speed of the motor 8 but alsoon the level of the excitation voltage, i.e. the DC link voltageprovided by the power supply 2. As the excitation voltage decreases, aparticular speed-correction value has a smaller net effect on the outputpower of the motor 8. Accordingly, in order to maintain constant outputpower, the speed-corrections values increase in magnitude withdecreasing excitation voltage.

For each power map, the drive controller 16 stores two speed-correctionmaps: an advance speed-correction map and a freewheel speed-correctionmap. Each speed-correction map comprises a lookup table storing aspeed-correction value for each of a plurality of speeds and a pluralityof voltage levels. Since the power map stores advance times andfreewheel times, the speed-correction values are expressed as times.However, should each power map alternatively store advance angles andfreewheel angles, the speed-correction maps might then storespeed-correction values expressed as angles. Tables 6 and 7 listrespectively the advance speed-correction map and the freewheelspeed-correction map for the 167 W power map.

TABLE 6 Speed DC Link Voltage (V) (rpm) 16.8 17.6 18.4 19.2 20.0 20.821.6 22.2 89500 −8.2 −6.9 −5.7 −4.7 −4.5 −4.1 −3.8 −3.5 90361 −7.4 −6.1−5.1 −4.2 −3.9 −3.7 −3.5 −3.3 91241 −6.5 −5.4 −4.4 −3.7 −3.5 −3.3 −3.1−2.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 99000 0  0 0  0  0  0  0  0  . . . . . . . . . . . . . . . . . . . . . . . . . . .102180    2.1   1.7   1.4   1.2   1.1   1.2   1.1   1.0 103305    3.0  2.4   2.0   1.6   1.6   1.6   1.5   1.4 104500    3.9   3.2   2.6  2.1   2.0   2.0   1.9   1.7

TABLE 7 Speed DC Link Voltage (V) (rpm) 16.8 17.6 18.4 19.2 20.0 20.821.6 22.2 89500 24.9 23.8 10.9   5.4   3.4   2.0   0.6   0.6 90361 22.121.2  7.7   4.9   3.0   1.8   0.6   0.3 91241 19.4 18.1  5.1   4.3   2.7  1.6   0.5   0.3 . . . . . . . . . . . . . . . . . . . . . . . . . . .99000 0  0  0  0  0  0  0  0  . . . . . . . . . . . . . . . . . . . . .. . . . . . 102180  −6.6 −7.0 −5.7 −1.2 −1.0 −0.6 −0.2 −0.4 103305  −9.4−8.8 −7.1 −2.1 −1.3 −0.8 −0.3 −0.1 104500  −12.2  −11.5  −8.1 −2.6 −1.6−0.9 −0.3 −0.1

It can be seen from the speed-correction maps that, as the motor speedincreases, the advance time is corrected by an amount that increases theadvance time, and the freewheel time is corrected by an amount thatdecreases the freewheel time. Additionally, as the excitation voltagedecreases, the amount by which the advance time and the freewheel timeare corrected increases. Since each power map stores an advance time anda freewheel time for a nominal speed, the speed-correction values at thenominal speed are zero.

When selecting values from the power and the speed-correction maps, thedrive controller 16 rounds down the excitation voltage and the speed ofthe motor 8 to the next nearest entry in the lookup table.

The drive controller 16 drives the winding 19 in a manner similar tothat described above for ‘High-Speed Acceleration Mode’. In particular,on detecting an edge of the position-sensor signal, the drive controller16 continues to excite the winding 19 for the time period, T_DRIVE_OFF:T_DRIVE_OFF=T_HALF_CYCLE−T_ADV−T_FREE

Again, the half-cycle time, T_HALF_CYCLE, is the time interval betweentwo successive edges of the position-sensor signal. Following the periodT_DRIVE_OFF, the drive controller 16 freewheels the winding 19 for theperiod T_FREE, after which the drive controller 16 commutates thewinding 19. The net result is that the drive controller 16 excites thewinding 19 in advance of the next edge of the position-sensor signal bythe advance time, T_ADV.

Again, FIG. 6 illustrates the waveforms of the winding current,position-sensor signal, excitation voltage, and control signals S1-S4over a couple of half cycles.

The drive controller 16 periodically monitors (e.g. each half cycle) thevoltage-level signal to obtain the excitation voltage. The advance time,T_ADV, and the freewheel time, T_FREE, are then obtained by selectingfrom the relevant power map the advance time and the freewheel timecorresponding to the excitation voltage. The times selected from thepower map are then corrected by speed-correction values selected fromthe speed-correction maps. So, for example, if the excitation voltageprovided by the power supply is 17.0 V (as determined by thevoltage-level signal) and the motor speed is 103 krpm (as determined bythe half-cycle time), the drive controller 16 selects an advance time of89 μs and a freewheel time of 56 μs from the 167 W power map (Table 4).The drive controller 16 then corrects the advance time by 2.09 μs, asdetermined by the advance speed-correction map (Table 6), and correctsthe freewheel time by −6.64 μs, as determined by the freewheelspeed-correction map (Table 7). Consequently, the drive controller 16uses an advance time, T_ADV, of 91.09 μs and a freewheel time, T_FREE,of 49.36 μs.

The drive controller 16 thus drives the motor 8 at constant output powerover a range of excitation voltages and motor speeds. Accordingly,constant output power is achieved as the power supply 2 discharges, andas the motor 8 experiences different loads.

The use of lookup tables storing advance and freewheel times, as well asthe speed-correction values, greatly simplifies the calculationsperformed by the processor 30 of the drive controller 16. Consequently,a relatively cheap processor 30 may be used to generate the controlsignal S1-S4 that excite and freewheel the winding 19.

Position-Sensor Error

Electromagnetic noise may cause the position sensor 13 to generatespurious edges. If detected by the drive controller 16, these spuriousedges would cause the drive controller 16 to excite the winding 19 atincorrect times. Not only would this adversely affect the performance ofthe motor system 5, but it may also result in excessive current in thewinding 19 that could potentially damage the switches Q2,Q4 ordemagnetise the rotor 17. The drive controller 16 therefore employsmeasures to minimise the possibility of detecting spurious edges. Theparticular measures employed depend upon the mode of operation.

When operating in ‘Low-Speed Acceleration Mode’, the drive controller 16excites the winding 19 in synchrony with the edges of theposition-sensor signal. Following commutation, the drive controller 16ignores the position-sensor signal for a predetermined time, e.g. 250μs. Accordingly, any spurious edges falling within this period areignored.

When operating in ‘High-Speed Acceleration Mode’ and ‘Running Mode’, thedrive controller 16 employs a position-sensor window. Any edges of theposition-sensor signal that are generated outside of this window areignored by the drive controller 16. If no edge is detected within theposition-sensor window, the drive controller 16 opens all switches for apredetermined time (e.g. 50 ms) and enters ‘Resynchronisation Mode’.

Since the winding 19 is excited in advance of the edges of theposition-sensor signal, each edge of the signal is expected to occur ata time T_ADV following excitation. The position-sensor window thereforestarts at excitation and has a length greater than the advance time,T_ADV. Preferably, the position-sensor window has a length correspondingto the sum of the advance time, T_ADV, and a quarter of the half-cycletime, T_HALF_CYCLE. This then provides a sufficiently tight window inwhich to reliably detect the next edge of the position-sensor signal. Ofcourse, the position-sensor window may be larger or smaller. However, asthe position-window decreases in length, the risk of missing a genuineedge of the signal increases, particularly if there is significantimbalance in the duty cycle of the position-sensor signal (see below).As the position-window increases, the risk of detecting a spurious edgeincreases. Accordingly, the position-sensor is preferably no greaterthan the sum of the advance time and half the half-cycle time.

In addition to generating spurious edges, the duty cycle of theposition-sensor signal may not be balanced. If the half-cycle time isdetermined from the interval between a single pair of successive edges(i.e. a single pulse) of the position-sensor signal, any imbalance inthe duty cycle will result in an incorrect half-cycle time. Since thehalf-cycle time is used not only to control the time at which thewinding 19 is excited, but also to apply the speed-correction values,any error in the half-cycle time may adversely affect the performance ofthe motor system 5. Accordingly, in order to reduce the error in thehalf-cycle time, the drive controller 16 obtains the half-cycle time byaveraging the interval between successive edges for a plurality ofpulses of the position-sensor signal. For example, the drive controller16 may obtain the half-cycle time by averaging the interval betweensuccessive edges for the previous four pulses of the position-sensorsignal. By averaging the interval between successive edges for aplurality of pulses, any variance in the half-cycle time issignificantly reduced.

Additionally, the drive controller 16 excites the winding 19 in responseto the rising edges or the falling edges, but not both, of theposition-sensor signal. The drive controller 16 then calculates thedrive-off times for both halves of each electrical cycle in response toa single edge, i.e. rising or falling, but not both. In particular, thedrive controller 16 calculates the drive-off time for the first halfcycle, T_DRIVE_OFF_1, in the manner described above, i.e. using thehalf-cycle time, the advance time and the freewheel time. The drive-offtime for the second half cycle, T_DRIVE_OFF_2, is then obtained byadding the half-cycle time to the drive-off time of the first halfcycle:T_DRIVE_OFF_1=T_HALF_CYCLE−T_ADV−T_FREET_DRIVE_OFF_2=T_DRIVE_OFF_1+T_HALF_CYCLE

Since the drive controller 16 acts in response to a single edge only,the drive controller 16 is less sensitive to any imbalance in the dutycycle of the position-sensor signal. Accordingly, the performance of themotor system 5 is not adversely affected by duty cycle imbalance.

Post-Assembly Fine Tune

Following assembly of the motor system 5, there are tolerances that mayadversely affect the performance of the motor system 5. Consequently,following assembly, the motor system 5 is subject to fine tuning.

The current controller 15 ensures that the current within the winding 19does not exceed a threshold. This then prevents demagnetisation of therotor 17 and protects the switches Q1-Q4 of the inverter 11. However,several component tolerances affect the current level at which thecurrent controller 15 generates the overcurrent signal. For example, thecurrent sensor 14 has a tolerance in the resistance of the senseresistor R1 and thus the voltage delivered to the input of the currentcontroller 15 has a variance. Additionally, there is a tolerance in thevoltage level of the reference voltage used by the current controller15. Furthermore, there is a tolerance in the comparator 25 input offsetvoltage and the input leakage current. Altogether, the tolerance stackon the current threshold can be as much as ±20%. This tolerance is toolarge to ensure that the motor 8 will run efficiently withoutpotentially demagnetising the rotor 17 or damaging the switches Q1-Q4 ofthe inverter 11. Accordingly, following assembly of the control system9, the current controller 15 is fine-tuned to trim out the componenttolerances.

The output of the inverter 11 is connected to an inductive load thatresembles the motor 8. An external current sensor accurately measuresthe current through the inductive load. The PWM module 27 is loaded witha relatively low duty cycle, and the inductive load is excited. As thecurrent in the inductive load rises, the current controller 15 generatesthe overcurrent signal to chop the current. Since the PWM module 27 isloaded with a relatively low duty cycle, the current is chopped at alevel below the ideal current threshold. The external current sensoraccurately measures the current level at which the overcurrent signalwas generated. The duty cycle of the PWM module 27 is then increased andthe process is repeated. Eventually, the current controller 15 generatesthe overcurrent signal at an ideal current threshold. At this point, thevalue of the duty cycle is written to the memory device 28 of thecurrent controller 15 as a scaling factor.

The current controller 15 is therefore fine-tuned such that anovercurrent signal is generated whenever the current in the winding 19exceeds a well-defined threshold, irrespective of component tolerances.By employing an accurate external current sensor and a fine resolutionfor the PWM duty cycle, the threshold at which the overcurrent signal isgenerated may be tightly controlled. Accordingly, tight control over thecurrent in the winding 19 is achieved without the need for expensive,high-tolerance components. Indeed, the use of a PWM module 27 provides asimple and cost-effective means for generating a threshold voltage.

Following assembly of the motor system 5, there is a toleranceassociated with the alignment of the position sensor 13 relative to themotor 8. This tolerance results in a phase difference between thedetected position of the rotor 17, as provided by the position-sensorsignal, and the actual position of the rotor 17. This in turn translatesto a phase difference between the edges of the position-sensor signaland the zero-crossings of the back emf in the winding 19. Followingassembly of the motor 8, the motor 8 is driven at a speed of 49.5 krpm.This speed corresponds to half the nominal speed (i.e. 99 krpm) for the167 W power map. Power to the motor 8 is then interrupted and the backemf in the winding 19 is measured and compared against the edges of theposition-sensor signal. The time difference between the edges of theposition-sensor signal and the zero-crossings of the back emf provides ameasure of the phase difference at 49.5 krpm. The time difference at49.5 krpm is then scaled for the nominal speed of each power map andstored to the memory device 30 of the drive controller 16 as aposition-sensor offset, T_POS_OFFSET. So, for example, the timedifference at 49.5 krpm is doubled to provide the position-sensor offsetfor the 167 W power map, while the time difference is multiplied by79.0/49.5 to provide the position-sensor offset for the 83 W power map.The drive controller 16 therefore stores a position-sensor offset foreach power map. Moreover, the position-sensor offset corresponds to atime difference between the edges of the position-sensor signal and thezero-crossings of back emf when the motor 8 operates at the nominalspeed for the corresponding power map (see Table 5).

When operating in ‘Running Mode’ the drive controller 16 uses theposition-sensor offset, T_POS_OFFSET, to correct the drive-off time,T_DRIVE_OFF:T_DRIVE_OFF=T_HALF_CYCLE−T_ADV−T_FREE−T_POS_OFFSET

Consequently, excitation of the winding 19 is better synchronised withthe position of the rotor 17, and thus with back emf, resulting in amore powerful and efficient motor system 5.

The phase difference between the edges of the position-sensor signal andthe zero-crossings of the back emf, when expressed as a time interval,decreases with the speed of the motor 8. Ideally then, the drivecontroller 16 corrects the drive-off time by an amount that varies withthe speed of the motor 8. However, by using a fixed time for theposition-sensor offset, the calculations performed by the drivecontroller 16 are greatly simplified. In particular, the drivecontroller 16 need not calculate what time correction should be appliedon the basis of the speed of the motor 8. As a result, the number ofinstructions performed by the drive controller 16 is reduced and thus arelatively simple and cheap processor 30 may be employed. The corollaryto this is that the motor system 5 is optimised for the nominal speed ofeach power map.

When operating in modes other than ‘Running Mode’, the speed of themotor is sufficiently slow that any phase difference between the edgesof the position-sensor signal and the zero-crossings of back emf isunlikely to impact significantly on the performance of the motor system5. Additionally, the time spent by the motor system 5 in theacceleration modes is relatively short. Accordingly, in spite of thesimplified correaction, the performance of the motor system 5 is notadversely affected.

The operating speed range for each power map is relatively narrow incomparison to the full speed range of the motor system 5. In particular,the operational speed range (minimum speed to maximum speed of Table 5)for each power map is no more than 20% of the full speed range (zero tomaximum speed). Consequently, the discrepancy between theposition-sensor offset and the phase difference at each end of theoperating range is relatively small, and thus relatively goodperformance is achieved over the full operating range using thefixed-time position-sensor offset.

By employing a position-sensor offset to correct for misalignment of theposition sensor, accurate synchronisation can be achieved between theedges of the position-sensor signal and the zero-crossings of back emffor a relatively small rotor, e.g. having a diameter of 10 mm or less.Accordingly, a high-speed compact motor system 5 may be realised.

Following manufacture and assembly of the motor system 5, there aretolerances in with the inductance and the back emf of the motor 8. Forexample, tolerances in the geometry of the pole tips of the stator 18and the air gap influence the inductance of the winding 19, whiletolerances in the magnetic properties of the rotor 17, as well as thegeometry of the air gap, influence the back emf in the winding 19. Theinductance and back emf of the motor 8 can vary by as much as ±5% and±10%. Consequently, the output power of different motor systems 5 maydiffer, in spite of the same control system 9 being used to drive themotor 8.

Following assembly of the motor system 5, the power maps employed by thedrive controller 16 are fine-tuned such that the same or similar outputpower is achieved for each motor system 5 irrespective of tolerances inthe inductance and the back emf. The motor system 5 is fine-tuned by anexternal fine-tune system storing a plurality of power maps. Each powermap stored by the fine-tune system comprises advance times and freewheeltimes that drive a nominal motor (i.e. one having a nominal inductanceand nominal back emf) at different output power. The fine-tune systemstores each of the power maps listed in Table 2, i.e. power maps thatdrive the nominal motor at 83 W, 96 W, 107 W, 136 W and 167 W. For eachof these base power maps, the fine-tune system additionally stores powermaps that drive the nominal motor at a higher output power and at alower output power. Each base map and the respective additional powermaps drive the nominal motor at discrete levels of output power that areseparated by a predetermined amount. For the purposes of the presentdescription, it will be assumed that, for each base map, the fine-tunesystem stores a single high power map that drives the motor at higheroutput power and a single low power map that drives the motor at loweroutput. Moreover, the high power map, base power map, and low power mapare separated by 4 W. Accordingly, for the 167 W base power map, thefine-tune system additionally stores a 163 W power map, and a 171 Wpower map. For the 136 W power map, the fine-tune system additionallystores 132 W and 140 W power maps, and so on.

The motor system 5 is fine tuned by loading the set of base power mapsinto the memory device 30 of the drive controller 16. The motor system 5is then driven with the 167 W power map using a 17 V DC link supply. Theinput power of the motor system 5 is then measured. The input power forthe 167 W power map should be around 190 W for a DC link voltage of 17V, see Table 4. If the measured input power is less than 188 W, thedrive controller 16 is loaded with the set of high power maps. As aresult, the motor system 5 is driven at a higher power (4 W more power)so as to compensate for the power difference. Conversely, if themeasured input power is greater than 192 W, the drive controller 16 isloaded with the set of low power maps. As a result, the motor system 5is driven at a lower power (4 W less power) so as to compensate for thepower difference. Accordingly, a different set of power maps is loadedinto the drive controller 16 so as to compensate for any differences inthe input power of the motor system 5. As a result, the same or similaroutput power may be achieved for different motors 8 having differentinductance and back emf.

By employing a plurality of power maps that are separated by 4 W, thepower of the motor system 5 may be fine-tuned to within ±2 W. It will,of course, be appreciated that the separation of the power maps may bedecreased so as to achieve tighter tolerance on the power of the motorsystem 5.

The fine-tuning process has the particular benefit that there is no needto measure the inductance or the back emf of the motor 8. Moreover, bymeasuring the power of the motor system 5 as it is driven and thencompensating accordingly, the fine-tuning process is also able tocompensate for armature reaction.

While the fine-tune system measures the input power of the motor system5, the output power might alternatively be measured. However, it isgenerally easier to measure the input power of the motor system 5.

Rather than loading a particular set of maps, driving the motor 8 andmeasuring the power of the motor 8, the motor system 5 may be fine-tunedby measuring a different parameter of the motor 8. The measuredparameter is then compared against that of a nominal motor and on thebasis of the comparison, one of the plurality of sets of power mapsstored by the fine-tune system is loaded into the drive controller 16.For example, the back emf of the motor 8 may be measured and comparedagainst a nominal back emf value (i.e. the back emf for the nominalmotor). If the measured back emf corresponds to the nominal back emf,the base power maps are loaded into the drive controller 16. Otherwise,a different set of power maps are loaded into the drive controller 16that take into account the difference in back emf. Accordingly, moreconsistent output power and performance may be achieved for differentmotors irrespective of tolerance in back emf. As noted above, the backemf is measured when obtaining the position-sensor offset. Accordingly,the back emf of the motor 8 may be measured without the need for anyadditional processes.

By controlling the advance angle and the freewheel angle in response tochanges in both excitation voltage and speed, the control system 9 isable to drive the motor 8 at constant output power over a range ofexcitation voltages and motor speeds. In the present context, constantoutput power should be understood to mean that the variance in theoutput power of the motor 8 is no greater than ±5%.

The control system 9 drives the motor 8 not only at constant outputpower but also at relatively high efficiency (i.e. the ratio of outputpower to input power). By controlling the advance angle and thefreewheel angle in response to changes in both excitation voltage andspeed, an efficiency of at least 75% is achievable over the range ofexcitation voltages and motor speeds. Indeed, for the power maps listedin Table 2, an efficiency of at least 80% is achievable. For example, ascan be seen from the figures for input and output power listed in Table4, an efficiency of around 88% is obtainable with the advance andfreewheel angles of the 167 W power map.

The range of excitation voltages over which constant output power and/orhigh efficiency is achieved is relatively broad. For the 6-cell batterypack the excitation voltage range is 16.8-23.0 V, while for the 4-cellbattery pack the excitation voltage range is 11.2-14.8. For both voltageranges, the minimum voltage is less than 80% of the maximum voltage.This represents a relatively large range over which constant outputpower and/or high efficiency is achieved. Accordingly, the controlsystem 9 is ideally suited for use in driving a motor of abattery-powered product, where the excitation voltage varies as thebattery discharges.

While each operating speed range is relatively narrow in comparison tothe full speed range, each operating speed range nevertheless spans atleast 10 krpm (Table 5). Moreover, the minimum speed for each operatingspeed range is greater than 60 krpm, while the maximum speed for eachoperating speed range is greater than 80 krpm. Indeed, for the 167 Wpower map, the maximum speed of the operating speed range is greaterthan 100 krpm. Over this sort of speed range, large differences inoutput power would arise without the control provided by the controlsystem. Moreover, efficiency at these relatively high speeds wouldgenerally be poor without the control provided by the control system.

With the control system 9, a single-phase permanent-magnet motor 8 maybe driven at relatively high speeds, and in particular at speeds inexcess of 60 krpm. Moreover, high speeds are achieved at relatively highefficiency. Indeed, as can be seen from Table 4, speeds in excess of 100krpm are attainable for an input power less than 200 W. Accordingly,high speeds are attainable at relatively high efficiency without theneed for additional phase windings, which would increase the cost andsize of the motor.

The control system 9 employs three different modes of operation thatcollectively achieve smooth and efficient performance of the motor 8.

When operating in ‘Low-Speed Acceleration Mode’, the winding 19 isexcited in synchrony with zero-crossings of the back emf in the winding19. At these relatively low speeds, the back emf in the winding 19 isrelatively small and does not impact on the ability to drive current,and thus power, into the winding 19. However, by exciting the winding 19in synchrony with back emf, the control required to drive the motor 8may be kept relatively simple.

When operating in ‘High-Speed Acceleration Mode’, the magnitude of theback emf begins to influence the ability to drive current into thewinding 19. By exciting the winding 19 in advance of the back emf,current is driven into the winding at earlier stage. Consequently, morepower is driven into the motor 8. By exciting the winding 19 in advanceof the back emf by a fixed period of time, the winding 19 is excited inadvance of the back emf by an angle that increases with rotor speed.Consequently, as the motor 8 accelerates, current is driven into thewinding 19 at an increasingly early stage and thus more power is driveninto the winding 19. Additionally, by employing a fixed advance time,the control required to drive the motor 8 is relatively simple.

When operating in ‘Running Mode’, the magnitude of the back emfsignificantly affects the ability to drive current into the winding 19.As in the ‘High-Speed Acceleration Mode’, the winding 19 is excited inadvance of the back emf such that current is driven into the winding 19at an earlier stage. Nevertheless, changes in the speed of the motor 8influence the magnitude of the back emf and thus the output power of themotor 8. Accordingly, by varying the advance time in response to changesin speed, the output power of the motor 8 may be better controlled. Inparticular, the advance time may be increased with increasing motorspeed. The increase in back emf is then compensated by current beingdriven into the winding 19 at an earlier stage. As a result, the same orsimilar output power may be achieved irrespective of changes in speed.

The control system 9 therefore employs different operating modes thatact to accelerate the motor 8 smoothly and efficiently up to runningspeed, and then to drive the motor 8 at constant output power.

In the embodiment described above, each power map stores an advance timefor each of a plurality of voltages. However, rather than storingadvance times, each power map may instead store the sum of the advancetime and the freewheel time. This then simplifies the calculation of thedrive-off time, T_DRIVE_OFF, which is directly proportional to the sumof advance time and the freewheel time obtained from the power map.Alternatively, since the half-cycle time, T_HALF_CYCLE, at each nominalspeed is known (e.g. 303.03 μs at 99 krpm, 320.86 μs at 93.5 krpm, andso on), each power map may instead store a drive-off time, rather thanan advance time, for each of the plurality of voltage levels. This thenfurther simplifies the calculations performed by the drive controller16. Moreover, as noted above, rather than storing advance times andfreewheel times, the power map might alternatively store advance anglesand freewheel angles. Accordingly, in a more general sense, each powermap stores a first control value and a second control value for each ofa plurality of voltage levels. The first control value is thenproportional to an advance angle and is used to control the angle ortime at which the winding 19 is excited. The second control value isthen proportional to a freewheel angle and controls the angle or timeover which the winding 19 is freewheeled. The drive controller 16 thenexcites the winding 19 in advance of zero-crossing of back emf at a timedefined by the first control value, and freewheels the winding 19 for atime defined by the second control value. The speed-correction maps thenstore appropriate speed-correction values for correcting the firstcontrol value and the second control value. In particular, the advancespeed-correction map stores speed-corrections values that are applied tothe first control value, and the freewheel speed-correction map storesspeed-correction values that are applied to the second control value.

In the embodiment described above, each power map stores control valuesthat are corrected for speed using correction values stored in aspeed-correction map. The storing of correction values has the benefitof reducing the overall memory requirements. In particular, eachcorrection value is smaller than a corresponding control value.Nevertheless, rather than storing a power map and two speed-correctionmaps for each output power level, the drive controller 16 mightalternatively store two master maps, each storing a control value foreach of a plurality of speeds and excitation voltages.

In the embodiment described above, both the advance time and thefreewheel time are corrected for speed. However, constant output powerover each operating speed range might equally be achieved by fixing oneof the advance time and the freewheel time and varying the other of theadvance time and the freewheel time. Since the winding 19 is freewheeledduring a period of falling back emf, the output power of the motorsystem 5 is more sensitive to changes in the advance time. Accordingly,of the two, the freewheel time is preferably kept fixed and the advancetime is corrected for speed. By fixing the freewheel time, thecalculations performed by the drive controller 16 are furthersimplified. Additionally, the freewheel speed-correction map may beomitted for each power map, thus reducing the memory requirements of thedrive controller 16. Although the freewheel time may be fixed fordifferent speeds, the corresponding freewheel angle is not. This followssince the electrical angle for a fixed period of time varies with thespeed of the motor 8.

Each power map stores control values that are calculated on the basis ofa nominal speed for the motor 8. Speed-correction values are thenapplied to the control values should the speed of the motor differ fromthe nominal speed. Additionally, the position-sensor offset for eachpower map corresponds to a time difference between the edges of theposition-sensor signal and the zero-crossings of back emf when the motor8 operates at the nominal speed. Accordingly, the control system 9 isoptimised for operation at the nominal speed within each operating speedrange. The nominal speed may therefore be chosen so as to optimiseperformance of the product 1. For example, the nominal speed maycorrespond to a speed at which the motor 8 predominantly operates.Alternatively, or additionally, the nominal speed may correspond to aspeed at which peak performance for the product 1 is achieved. Forexample, as illustrated in FIG. 8, the product 1 may be a vacuum cleanerfor which peak airwatts occurs at a particular speed within eachoperating speed range. The nominal speed for each power map thencorresponds to the speed at which peak airwatts is achieved.

The particular advance times, freewheel times, and speed-correctionvalues listed in Tables 4-7 are provided by way of example only. Theparticular control values and speed-correction values needed to achieveconstant output power will depend on the particular characteristics ofthe motor 8. The advance and freewheel angles for a particular motor areobtained from simulation that generates the best performance (e.g. bestefficiency) for the motor at the desired output power within theconstraints of the control system. Within the simulation, constraintsmay be placed on the behaviour of the advance angle and the freewheelangle. For example, the advance angle may be constrained to increase andthe freewheel angle may be constrained to decrease with decreasingexcitation voltage and/or increasing motor speed.

While reference has been made to varying both the advance angle and thefreewheel angle in response to changes in excitation voltage and motorspeed, significant advantages may nevertheless be gained in varying onlyone of the advance angle and the freewheel angle. In particular, asalready noted, by freewheeling the winding 19 within the region offalling back emf, a more efficient motor system 5 may be realised.Moreover, by varying the freewheel angle in response to changes involtage and/or speed, better control of both efficiency and output powerof the motor system can be achieved, irrespective of any control of theadvance angle.

As shown in FIG. 8, the product 1 may take the form of a vacuum cleaner,particularly a handheld vacuum cleaner, having an accessory 4 in theform of a motorised brushbar. The output power of the motor system 5,and thus the suction power of the vacuum cleaner, will then varyaccording to whether or not the brushbar is attached to the vacuumcleaner and/or turned on. Additionally, the power-mode selection switch7 may be used by the user to select a high-power mode when increasedsuction is required. Since the motor system 5 maintains constant outputpower over each operating speed range, the vacuum cleaner is able tomaintain constant suction over a range of loads. Furthermore, since themotor system 5 maintains constant output power in response to changes inexcitation voltage, the vacuum cleaner is able to maintain constantsuction in response to changes in the voltage of the power supply 2. Inparticular, where the power supply 2 is a battery pack, the vacuumcleaner in able to maintain constant suction as the battery packdischarges.

While the power supply 2 of the embodiment described above is a DCsupply, and in particular a DC battery pack, the power supply 2 mightequally comprise an AC supply, rectifier and filter to provide a DCvoltage. Moreover, while the motor 8 and the inverter 11 of theembodiment described above each comprise a single phase, the motor 8 andthe inverter 11 may comprise additional phases. The drive controller 16then drives each phase in the manner described above. In particular,each phase is excited in synchrony with the zero-crossings of the backemf during ‘Low-Speed Acceleration Mode’, and each phase is sequentiallyexcited and freewheeled during ‘High-Speed Acceleration Mode’ and‘Running Mode’. The position sensor 13 described above is a Hall-effectsensor. However, alternative position sensors capable of outputting asignal indicative of the position of the rotor 17, and thus thezero-crossings of back emf in the winding 19, might equally be employed,such as an optical sensor.

Reference has thus far been made to a control system 9 that controls theoperation of a motor 8. However, the control system 9 might equally beused to control the operation of a generator or other electric machine.

The invention claimed is:
 1. A method of controlling an electricmachine, the method comprising: storing a plurality of power maps,wherein each power map comprises a plurality of control values for aplurality of voltages, and wherein the control values are used tocontrol the electric machine such that, for each power map, the electricmachine is driven at different power over the plurality of voltages;selecting a power map of the plurality of power maps in response to aninput signal; and exciting a winding of the electric machine at one ormore times defined by the control values of the selected power map. 2.The method of claim 1, wherein each power map comprises a lookup tablestoring a first control value and second control value for each of aplurality of voltages, and the method comprises selecting from theselected power map a first control value and a second control valueaccording to the level of an excitation voltage, and sequentiallyexciting and freewheeling a winding of the electric machine, wherein thewinding is excited in advance of zero-crossings of back emf in thewinding by an advance time defined by the first control value, and thewinding is freewheeled for a freewheel time defined by the secondcontrol value.
 3. The method of claim 1, wherein the method comprisesselecting from the selected power map one or more control valuesaccording to the level of an excitation voltage, and using the selectedcontrol values to sequentially excite and freewheel a winding of theelectric machine.
 4. The method of claim 2, wherein each power mapstores control values that increase the advance time and decrease thefreewheel time with decreasing excitation voltage.
 5. The method ofclaim 2, wherein the method comprises periodically monitoring theexcitation voltage and selecting from the power map a first controlvalue and a second control value according to the monitored voltage. 6.The method of claim 1, wherein each power map stores control values fordriving the electric machine at constant power over the plurality ofvoltages.
 7. The method of claim 1, wherein each power map storescontrol values for driving the electric machine at an efficiency of atleast 75% over the plurality of voltages.
 8. The method of claim 6 or 7,wherein the plurality of voltages extends between a minimum voltage anda maximum voltage, and the minimum voltage level is less than 80% of themaximum voltage.
 9. The method of claim 1, wherein each power map storescontrol values for driving the electric machine over different operatingspeed ranges over the plurality of voltages.
 10. The method of claim 3,wherein the method comprises applying a speed-correction value to atleast one of the first control value and the second control value, thespeed-correction value varying with the speed of the electric machine.11. The method of claim 10, wherein the speed-correction value varieswith both the speed of the electric machine and the level of theexcitation voltage.
 12. The method of claim 11, wherein the methodcomprises storing a speed-correction lookup table for each power map,and the speed-correction lookup table stores a first speed-correctionvalue and a second speed-correction value for each of a plurality ofspeeds and a plurality of voltages, and the method comprises selectingfrom the speed-correction lookup table a first speed-correction valueand a second speed-correction value according to the speed of theelectric machine and the level of the excitation voltage, applying thefirst speed-correction value to the first control value and applying thesecond speed-correction value to the second control value.
 13. Themethod of claim 12, wherein the speed-correction lookup table storesspeed-correction values that increase the advance time and decrease thefreewheel time with increasing speed.
 14. The method of claim 1, whereinthe input signal is at least one of a power-supply identification signalthat identifies a type of power supply providing an excitation voltage,an accessory signal that is generated when an accessory draws power froma power supply providing an excitation voltage, and a user-generatedpower-mode selection signal.
 15. The method of claim 14, wherein themethod comprises selecting a power map for driving the electric machineat a lower power in response to the accessory signal.
 16. A controlsystem for an electric machine, the control system comprising a memorystoring a plurality of power maps, wherein each power map comprises aplurality of control values for a plurality of voltages, and the controlvalues are used to control the electric machine such that, for eachpower map, the electric machine is driven at different power over theplurality of voltages, wherein the control system is configured toselect one of the power maps in response to an input signal, and whereina winding of the electric machine is excited at one or more timesdefined by the control values of the selected power map.
 17. A productcomprising a power supply, an electric machine, and a control systemstoring a plurality of power maps, wherein each power map comprises aplurality of control values for a plurality of voltages, and the controlvalues are used to control the electric machine such that, for eachpower map, the electric machine is driven at different power over theplurality of voltages, and the control system is configured to selectone of the power maps in response to an input signal, and use theselected power map to drive the electric machine, wherein driving theelectric machine includes exciting a winding of the electric machine attimes defined by the control values of the selected power map.
 18. Theproduct of claim 17, wherein the power supply outputs a power-supplyidentification signal that identifies the type of power supply, and thecontrol system selects the power map in response to the power-supplyidentification signal.
 19. The product of claim 18, wherein thepower-supply identification signal has a frequency that is unique to thetype of power-supply.
 20. The product of claim 17, wherein the productcomprises an accessory that is powered by the power supply, theaccessory generates an accessory signal when powered on, the accessorysignal is delivered to the control system, and the control systemselects the power map in response to the accessory signal.
 21. Theproduct of claim 17, wherein the product comprises a user interfacehaving a power-mode selection switch for switching between a high-powerand a low-power mode, the power-mode selection switch generates apower-mode selection signal that is delivered to the control system, andthe control system selects the power map in response to the power-modeselection signal.
 22. The product of claim 17, wherein the product is avacuum cleaner.
 23. The product of claim 22, wherein the vacuum cleanercomprises an accessory in the form of a motorised brushbar and thecontrol system selects different power maps for driving the electricmachine at different power when the motorized brushbar is turned on andoff.